From 8774b03482f28b7665a191d75bc2ebabdef84283 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Fri, 24 Mar 2006 16:40:31 +0000 Subject: [PATCH] Fix bug 2095: three closing brackets --- includes/Parser.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 33bfadfa06..1c8eca9c6a 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1407,7 +1407,11 @@ class Parser # Still some problems for cases where the ] is meant to be outside punctuation, # and no image is in sight. See bug 2095. # - if( $text !== '' && preg_match( "/^\](.*)/s", $m[3], $n ) ) { + if( $text !== '' && + preg_match( "/^\](.*)/s", $m[3], $n ) && + strpos($text, '[') !== false + ) + { $text .= ']'; # so that replaceExternalLinks($text) works later $m[3] = $n[1]; } -- 2.20.1